function draw_trajectory(obj,mode,sat)
%DRAW_TRAJECTORY 用于画轨迹
%   2是平面，3是3D
global sc;
    if mode == 2
        lat = obj.PT.("Lat-Lon-Alt")(:,1);
        lon = obj.PT.("Lat-Lon-Alt")(:,2);
        geoplot(lat, lon, "b-")
        geolimits([min(lat)-0.1,max(lat)+0.1],[min(lon)-0.1,max(lon)+0.1]);
        geobasemap topographic;
    end
    if mode == 3
       aircraft = satellite(sc,obj.PT, CoordinateFrame="geographic", Name="Aircraft");
       aircraft.MarkerColor = [0.8,1,0.3];
       aircraft.MarkerSize = 2;
       aircraft.groundTrack.TrailLineColor = [0.1,0.2,1];
       aircraft.groundTrack.LineWidth = 3;
       % pointAt(aircraft,obj.AT,CoordinateFrame="ned");
       % access(aircraft,sat.sat);
       satelliteScenarioViewer(sc,"ShowDetails",false);
       show(aircraft.GroundTrack);
    end
    if mode == 4
       aircraft = satellite(sc,obj.PT, CoordinateFrame="geographic", Name="Aircraft");
       aircraft.MarkerColor = [0.8,1,0.3];
       aircraft.MarkerSize = 2;
       aircraft.groundTrack.TrailLineColor = [0.1,0.2,1];
       % pointAt(aircraft,obj.AT,CoordinateFrame="ned");
       % access(aircraft,sat.sat);
       satelliteScenarioViewer(sc,"ShowDetails",false);
       show(aircraft.GroundTrack);
    end
    if mode == 5
       traj = obj.PT.("Lat-Lon-Alt");
       plot3(traj(:,1),traj(:,2),traj(:,3),'LineWidth',2);
       xlabel('Lat');
       ylabel('Lon');
       zlabel('H');
       plot_beautier;
    end
end

